﻿<UserControl x:Class="S2Snext.GUI.Dialogs.LoadIndicator"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:global="clr-namespace:" x:Name="root"
             mc:Ignorable="d" 
             d:DesignHeight="50" d:DesignWidth="50">
	<UserControl.Resources>
		<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
		<Color x:Key="FilledColor" A="255" B="237" R="95" G="204"/>
		<Color x:Key="UnfilledColor" A="0"  B="250" R="170" G="231"/>
		<SolidColorBrush x:Key="UnfilledBrush" Color="{StaticResource UnfilledColor}"/>

		<Storyboard x:Key="Animation0" FillBehavior="Stop" BeginTime="00:00:00.0" RepeatBehavior="Forever">
			<ColorAnimationUsingKeyFrames Storyboard.TargetName="_00" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
				<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
				<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>

		<Storyboard x:Key="Animation1" BeginTime="00:00:00.2" RepeatBehavior="Forever">
			<ColorAnimationUsingKeyFrames Storyboard.TargetName="_01" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
				<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
				<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>

		<Storyboard x:Key="Animation2" BeginTime="00:00:00.4" RepeatBehavior="Forever">
			<ColorAnimationUsingKeyFrames Storyboard.TargetName="_02" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
				<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
				<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>

		<Storyboard x:Key="Animation3" BeginTime="00:00:00.6" RepeatBehavior="Forever">
			<ColorAnimationUsingKeyFrames Storyboard.TargetName="_03" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
				<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
				<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>

		<Storyboard x:Key="Animation4" BeginTime="00:00:00.8" RepeatBehavior="Forever">
			<ColorAnimationUsingKeyFrames Storyboard.TargetName="_04" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
				<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
				<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>

		<Storyboard x:Key="Animation5" BeginTime="00:00:01.0" RepeatBehavior="Forever">
			<ColorAnimationUsingKeyFrames Storyboard.TargetName="_05" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
				<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
				<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>

		<Storyboard x:Key="Animation6" BeginTime="00:00:01.2" RepeatBehavior="Forever">
			<ColorAnimationUsingKeyFrames Storyboard.TargetName="_06" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
				<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
				<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>

		<Storyboard x:Key="Animation7" BeginTime="00:00:01.4" RepeatBehavior="Forever">
			<ColorAnimationUsingKeyFrames Storyboard.TargetName="_07" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
				<SplineColorKeyFrame KeyTime="00:00:00.0" Value="{StaticResource FilledColor}"/>
				<SplineColorKeyFrame KeyTime="00:00:01.6" Value="{StaticResource UnfilledColor}"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>

	<UserControl.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Animation0}"/>
			<BeginStoryboard Storyboard="{StaticResource Animation1}"/>
			<BeginStoryboard Storyboard="{StaticResource Animation2}"/>
			<BeginStoryboard Storyboard="{StaticResource Animation3}"/>
			<BeginStoryboard Storyboard="{StaticResource Animation4}"/>
			<BeginStoryboard Storyboard="{StaticResource Animation5}"/>
			<BeginStoryboard Storyboard="{StaticResource Animation6}"/>
			<BeginStoryboard Storyboard="{StaticResource Animation7}"/>
		</EventTrigger>
	</UserControl.Triggers>
		<Canvas Name="CanvasImg" Visibility="Visible" Height="50" Width="50">
			<Canvas.Resources>
				<Style TargetType="Ellipse">
					<Setter Property="Width" Value="10"/>
					<Setter Property="Height" Value="10" />
					<Setter Property="Fill" >
						<Setter.Value>
							<SolidColorBrush Color="{StaticResource FilledColor}"></SolidColorBrush>
						</Setter.Value>
					</Setter>
				</Style>
			</Canvas.Resources>

			<Ellipse x:Name="_00" Canvas.Left="0.5" Canvas.Top="20.5"/>
			<Ellipse x:Name="_01" Canvas.Top="6.5" Canvas.Left="5.25"/>
			<Ellipse x:Name="_02" Canvas.Left="19.25" Canvas.Top="0.25"/>
			<Ellipse x:Name="_03" Canvas.Left="33.5" Canvas.Top="6.25"/>
			<Ellipse x:Name="_04" Canvas.Left="39.25" Canvas.Top="20.25" />
			<Ellipse x:Name="_05" Canvas.Left="33.5" Canvas.Top="34"/>
			<Ellipse x:Name="_06" Canvas.Left="19.5" Canvas.Top="39.25"/>
			<Ellipse x:Name="_07" Canvas.Top="34" Canvas.Left="5.25" />

		</Canvas>
</UserControl>
